<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<title>商品详情</title>
		<%@include file="../common/common.jsp" %>
		<link rel="stylesheet" href="${ctx}/css/body.css" />
	</head>

	<body>
		<div class="goodData clearfix" style="background: url('<c:if test="${not empty goodsDetail.picture}">${baseFile}${goodsDetail.picture}</c:if><c:if test="${empty goodsDetail.picture}">${ctx }/image/defualt.png</c:if>');background-size:100% 100%;">
			
			<input type="hidden" name="goodsIdd" id="goodsIdd" value="${param.id}">
			<a href="javascript:history.back(-1)"><img src="${ctx }/image/return001.png" alt="" class="fl" /></a>
			<%-- <img src="${ctx }/image/share001.png" alt="" class="fr" /> --%>
			<a href="#" class="headerR"><img src="${ctx }/image/more001.png" alt="" class="fr"/></a>
			<div class="more">
				<a href="${ctx }/member/news">
					<img src="${ctx }/image/more02.png" alt="" />
					<span>消息</span>
				</a>
				<a href="${ctx }/">
					<img src="${ctx }/image/more03.png" alt="" />
					<span>首页</span>
				</a>
				<a href="${ctx }/goods/searchGoods">
					<img src="${ctx }/image/more04.png" alt="" />
					<span>搜索</span>
				</a>
				<a href="${ctx }/favorites/mycollect">
					<img src="${ctx }/image/more05.png" alt="" />
					<span>我的收藏</span>
				</a>
			</div>
		</div>
		<div class="goodDataO clearfix">
			<div>
				<p class="moreWord">${goodsDetail.name}</p>
				<p>
					<c:choose>
						<c:when test="${goodsDetail.memberMarketPrice!=null and  goodsDetail.memberMarketPrice>0}">
							<b>¥ ${goodsDetail.memberMarketPrice}</b>
						</c:when>
						<c:otherwise><b>¥ ${goodsDetail.marketPrice}</b></c:otherwise>
					</c:choose>
					
					<a href="javascript:void(0);">¥ ${goodsDetail.marketPrice}</a>
					<span class="fr">月销<i class="monthSale">${goodsDetail.monthSaleMount}</i>笔</span>
				</p>
				<p>
					<span>16:00前付款，预计2月10日(周五)送达</span>
					<span class="fr">快递：免运费</span>
				</p>
			</div>
			<ul class="clearfix">
				<li class="fl">
					<img src="${ctx }/image/xq.png" alt="" />
					<span>100%正品保证</span>
				</li>
				<li class="fl">
					<img src="${ctx }/image/xq.png" alt="" />
					<span>按时发货</span>
				</li>
				<li class="fl">
					<img src="${ctx }/image/xq.png" alt="" />
					<span>急速退款</span>
				</li>
				<li class="fl">
					<img src="${ctx }/image/xq.png" alt="" />
					<span>7天无理由退换货</span>
				</li>
			</ul>
		</div>
		<p class="jiange"></p>
		<%--   2017.7.6 隐藏会员代理信息
		<ul class="goodDataB">
			<li class="clearfix">
				<span class="fl">代理商等级</span>
				<span class="fr">代理价格</span>
			</li>
			<c:forEach items="${gradeList }" var="grade">
				<li class="clearfix">
					<span class="fl">${grade.gradeName}</span>
					<span class="fr">¥ ${grade.marketDiscount}</span>
				</li>
			</c:forEach>
		</ul> --%>
		<p class="jiange"></p>
		<a href="#" class="goodDataT">
			<span><i>选择颜色，</i><i>尺码分类</i></span>
			<img src="${ctx }/image/right12-20.png" alt="" class="fr" />
		</a>
		<p class="jiange"></p>
		
		<a href="javascript:void(0);" class="goodDataF">
			<p>商品评价(${totalCount[0]})</p>
			<c:choose>	
				<c:when test="${totalCount[0]!='0'}">
					<p>
					<c:choose>
						<c:when test="${commentList.mImg!=null and commentList.mImg!=''}">
							<img src="${baseFile}${commentList.mImg}" alt="" />
						</c:when>
						<c:otherwise><img src="${ctx }/image/xquser.png" alt="" /></c:otherwise>
					</c:choose>
					<span>${commentList.memberName }</span>
					<span style="float: right; margin-top: 1.2rem;"><fmt:formatDate value='${commentList.createTime}' pattern='yyyy-MM-dd HH:mm:ss'/> &nbsp; ${commentList.specInfo}</span>
					</p>
					<p>${commentList.consultContent }</p>
					<span> ${commentList.specInfo}</span>
				</c:when>
				<c:otherwise>
				</c:otherwise>
			</c:choose>
		</a>
		<div class="goodDataS clearfix">
			<c:choose>	
				<c:when test="${totalCount[0]=='0'}">
					<a href="javascript:void(0);" class="fl">暂无评价</a>
				</c:when>
				<c:otherwise><a href="${ctx}/consultComment/initGoodsComment?type=2&status=0&goodsId=${goodsDetail.id}" class="fl">查看全部评价</a>
				</c:otherwise>
			</c:choose>
			
			<%-- <a href="${ctx}/consultComment/initGoodsCousult?type=1&goodsName=${goodsDetail.name}&status=0&goodsId=${goodsDetail.id}" class="fr">咨询商品</a>
		 --%>
		</div>
		<p class="jiange"></p>
		<%-- <ul class="goodDataE">
			<li>
				<a href="#">
					<img src="${ctx }/image/lys.png" alt="" />
					<p>
						<span>雷伊丝旗舰店</span>
						<span>浙江省金华市</span>
					</p>
				</a>

			</li>
			<li class="goodDataEo">
				<a href="allGoodsO.html" class="fl">
					<span>314</span>
					<span>全部商品</span>
				</a>
				<p class="fl">
					<span>688.4万</span>
					<span>收藏人数</span>
				</p>
				<p class="fl">
					<span>9.00分</span>
					<span>综合评价</span>
				</p>
			</li>
		</ul>
		<div class="goodDataS clearfix goodDataSo">
			<a href="allGoodsT.html" class="fl">全部商品</a>
			<a href="store.html" class="fr">进入店铺</a>
		</div> --%>
		<p class="jiange"></p>
		<ul class="goodList clearfix">
			<li class="fl">图文详情</li>
			<li class="fl">产品参数</li>
			<!-- <li class="fl">店铺推荐</li> -->
		</ul>
		<%-- <img src="${ctx}/image/details.png" alt="" class="storeE" />  --%>
		<div class="storeE">
			${goodsDetail.descript}
		</div>
		
		<div class="meng"></div>
		<div class="share clearfix">
			<p>
				<span>分享到</span>
				<img src="${ctx}/image/fxclose.png" alt="" class="fr" />
			</p>
			<div>
				<a href="#" class="fl">
					<img src="${ctx}/image/fxqq.png" alt="" />
					<span>QQ好友</span>
				</a>
				<a href="#" class="fl">
					<img src="${ctx}/image/fxwx.png" alt="" />
					<span>微信好友</span>
				</a>
				<a href="#" class="fl">
					<img src="${ctx}/image/fxpyq.png" alt="" />
					<span>朋友圈</span>
				</a>
				<a href="#" class="fl">
					<img src="${ctx}/image/fxfz.png" alt="" />
					<span>复制链接</span>
				</a>
			</div>
		</div>
		<div class="attribute">
			<div class="attributes">
			<a href="#"><img src="<c:if test="${not empty goodsDetail.picture}">${baseFile}${goodsDetail.picture}</c:if><c:if test="${empty goodsDetail.picture}">${ctx }/image/defualt.png</c:if>" alt="" /></a>
			<p>
				<span class="wordO">${goodsDetail.name}</span>
				<span><b>¥ ${goodsDetail.marketPrice }</b></span>
				<span>库存<i class="productStock">${goodsDetail.baseQuantity}</i>件</span>
			</p>
			<img src="${ctx}/image/fxclose.png" alt="" class="fr" />
		</div>
		<ul class="addAttributes clearfix addAttribu">
		
			<c:forEach items="${goodsDetail.goodsSkuList }" var="goodsSku" varStatus="statusT">
				<c:if test="${statusT.index == '0'}">
					<li>${goodsSku.name}</li>
					<li class="clearfix <c:if test="${fn:indexOf(goodsSku.name,'颜色') !=-1 }">goodesT</c:if> <c:if test="${fn:indexOf(goodsSku.name,'尺码') !=-1 }">goodesF</c:if>">
						<c:forEach items="${goodsSku.goodsSkuValueList }" var="sku">
							<a href="#" class="fl"  goodsSkuValueId = "${sku.valueId}">${sku.valueName}<i></i></a>
						</c:forEach>
					</li>
				</c:if>
				
				<c:if test="${statusT.index == '1'}">
					<li>${goodsSku.name}</li>
					<li class="clearfix <c:if test="${fn:indexOf(goodsSku.name,'颜色') !=-1 }">goodesT</c:if> <c:if test="${fn:indexOf(goodsSku.name,'尺码') !=-1 }">goodesF</c:if>">
						<c:forEach items="${goodsSku.goodsSkuValueList }" var="sku">
							<a href="#" class="fl"  goodsSkuValueId = "${sku.valueId}">${sku.valueName}<i></i></a>
						</c:forEach>
					</li>
				</c:if>
			</c:forEach>
		</ul>
		<div class="addA clearfix">
			<span class="fl">数量</span>
			<div class="fr clearfix">
				<a href="#" class="scnImg fl"><img src="${ctx }/image/minus-sign.png" alt="" /></a>
				<input type="text" name="" id="" value="1" class="fl"/>
				<a href="#" class="fr jia"><img src="${ctx }/image/plus.png" alt="" /></a>
			</div>
		</div>
		<a href="#" class="addAs">确定</a>
		</div>
		
		<ul class="goodDataA">
			<li>
				<span>品牌</span>
				<span>${goodsDetail.brandName}</span>
			</li>
			<li>
				<span>商品分类</span>
				<span>${goodsDetail.className}</span>
			</li>
			<li>
				<span>商品标题</span>
				<span>${goodsDetail.title}</span>
			</li>
			<li>
				<span>商品名称</span>
				<span>${goodsDetail.name}</span>
			</li>
			<li>
				<span>货号</span>
				<span>${goodsDetail.specification }</span>
			</li>
			<li>
				<span>单位</span>
				<span>${goodsDetail.unitName }</span>
			</li>
		</ul>
		<div class="informationD storeD goodes clearfix">
			<span class="fl"></span>
			<p>为您推荐</p>
			<span class="fr"></span>
		</div>
		<%-- <ul class="homeGoods clearfix goodesO">
			<li>
				<ul>
					<li class="fl">
						<a href="#">
							<img src="${ctx }/image/pic5.png" alt="" />
						<p class="moreWord">${goodsDetial.name}</p>
						</a>
						
						<p>
							<span><b>¥ </b>2199.<b>00</b></span>
						</p>
					</li>
					<li class="fr">
						<a href="#">
							<img src="${ctx }/image/pic5.png" alt="" />
						    <p class="moreWord">2017春秋装新款韩版百搭宽松圆领套头大码宽松显瘦雪...</p>
						</a>
						<p>
							<span><b>¥ </b>2199.<b>00</b></span>
						</p>
					</li>
				</ul>
			</li>
			<li>
				<ul>
					<li class="fl">
						<a href="#">
							<img src="${ctx }/image/pic5.png" alt="" />
						    <p class="moreWord">2017春秋装新款韩版百搭宽松圆领套头大码宽松显瘦雪...</p>
						</a>
						<p>
							<span><b>¥ </b>2199.<b>00</b></span>
						</p>
					</li>
					<li class="fr">
						<a href="#">
							<img src="${ctx }/image/pic5.png" alt="" />
						    <p class="moreWord">2017春秋装新款韩版百搭宽松圆领套头大码宽松显瘦雪...</p>
						</a>
						<p>
							<span><b>¥ </b>2199.<b>00</b></span>
						</p>
					</li>
				</ul>
			</li>
			<li>
				<ul>
					<li class="fl">
						<a href="#">
							<img src="${ctx }/image/pic5.png" alt="" />
						    <p class="moreWord">2017春秋装新款韩版百搭宽松圆领套头大码宽松显瘦雪...</p>
						</a>
						<p>
							<span><b>¥ </b>2199.<b>00</b></span>
						</p>
					</li>
					<li class="fr">
						<a href="#">
							<img src="${ctx }/image/pic5.png" alt="" />
						    <p class="moreWord">2017春秋装新款韩版百搭宽松圆领套头大码宽松显瘦雪...</p>
						</a>
						<p>
							<span><b>¥ </b>2199.<b>00</b></span>
						</p>
					</li>
				</ul>
			</li>
		</ul> --%>
		<div class="bottom"></div>
        <ul class="foot clearfix ">
        	<li class="fl">
        		<%-- <img src="${ctx }/image/dp.png" alt="" />
        		<span>店铺</span> --%>
        	</li>
        	<li class="fl">
        		<img src="${ctx }/image/gw.png" alt="" />
        		<span>购物车</span>
        		<p class="shuliang"><%=cartItemsCount%></p>
        	</li>
        	<li class="fl">
        		<img src="${ctx }/image/sc.png" alt="" />
        		<span>收藏</span>
        	</li>
        	<li class="fl">
        		<a href="javascript:void(0);" >加入购物车</a>
        	</li>
        	<li class="fl">
        		<a href="javascript:void(0);" >立即购买</a>
        	</li>
        </ul>
        
	</body>
	
	 <script type="text/javascript" src="${ctx}/js/public.js"></script> 
	 <script type="text/javascript" src="${ctx}/js/goods/goodsDetail.js"></script> 

</html>
